package com.hl.card.award.controller;

import com.hl.card.award.service.ITrainRewardByTrans;
import com.hl.card.common.util.ResponseObject;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * java类简单作用描述
 *
 * @ProjectName: distdev
 * @Package: com.hl.card.modular.pack.controller
 * @ClassName: ${TYPE_NAME}
 * @Description: java类作用描述
 * @Author: 作者姓名
 * @CreateDate: 2018/7/9 17:45
 * @UpdateUser: Neil.Zhou
 * @UpdateDate: 2018/7/9 17:45
 * @UpdateRemark: The modified content
 * @Version: 1.0
 * <p>Copyright: Copyright (c) 2018</p>
 */
@RestController
@RequestMapping("/api")
public class TrainRewardByTransController {
    @Autowired
    private ITrainRewardByTrans rewardByTrans;

    @PostMapping(value = "/user/getCurrTrainCode")
    public ResponseObject getCurrTrainCode() {
        return rewardByTrans.getCurrTrainCode("WJ");
    }

    @PostMapping(value = "/user/getCurrTrainConfig")
    public ResponseObject getCurrTrainConfig() {
        return rewardByTrans.getCurrTrainConfig("WJ");
    }

    @PostMapping(value = "/user/currTrain")
    public ResponseObject currTrain(String mobile, String paper) {
        return rewardByTrans.currTrain(mobile, "WJ", paper);
    }

    @PostMapping(value = "/user/checkCurrTrain")
    public ResponseObject checkCurrTrain(String mobile) {
        return rewardByTrans.checkCurrTrain(mobile, "WJ");
    }

    @PostMapping(value = "/user/getCurrZHSCCode")
    public ResponseObject getCurrZHSCnCode() {
        return rewardByTrans.getCurrTrainCode("ZHSC");
    }

    @PostMapping(value = "/user/getCurrZHSCConfig")
    public ResponseObject getCurrZHSCConfig() {
        return rewardByTrans.getCurrTrainConfig("ZHSC");
    }

    @PostMapping(value = "/user/SubCurrZHSC")
    public ResponseObject currZHSC(String mobile, String paper) {
        return rewardByTrans.currTrain(mobile, "ZHSC", paper);
    }

    @PostMapping(value = "/user/checkCurrZHSC")
    public ResponseObject checkCurrZHSC(String mobile) {
        return rewardByTrans.checkCurrTrain(mobile, "ZHSC");
    }
}
